home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Variations
/
power-set
< prev
next >
Wrap
Text File
|
1998-08-11
|
279b
|
8 lines
power-set elements
The function powerset is able to generate not only permutations but all possible sub-permutations possible from a list of element.
(power-set '(3 4 5 7))
=> ((3 4 5) (3 4) (3 4 7) (3 5) (3) (3 7) (3 5 7)
(4 5) (4) (4 7) (5) (7) (5 7) (4 5 7) (3 4 5 7))